package com.diandi.signature.enums.platfrom;

/**
 * Created by Administrator on 2017/7/4.
 */
public enum BusinessStatus {
    接收成功(1,"接收成功"),
    接收失败(3,"接收失败"),
    处理中(2,"处理中"),
    同步回执成功(4,"同步回执成功"),
    异步回执成功(5,"异步回执成功"),
    异步回执失败(6,"异步回执失败"),
    ;
    private int status;
    private String desc;

    BusinessStatus(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static BusinessStatus getEmun(int status){
        for (BusinessStatus businessStatus : BusinessStatus.values()) {
            if(businessStatus.getStatus() == status){
                return businessStatus;
            }
        }
        return null;
    }
}
